$.fn.pageArrowRender = function() {
    var a, b, c, d, e, f, g, h, i, j, k, m, n, o, p;
    if ($(this).empty(), $(this).attr("total") ? a = Number($(this).attr("total")) : alert(uncompile(quiLanguage.pageArrow.errorMessage1)), 
    b = 10, $(this).attr("pageSize") ? b = Number($(this).attr("pageSize")) : $(this).attr("pageSize", b), 
    c = 50, $(this).attr("selWidth") && (c = Number($(this).attr("selWidth"))), d = !1, 
    (1 == $("#skin").attr("splitMode") || "true" == $("#skin").attr("splitMode")) && (d = !0), 
    e = 0, d || (f = $(window.top.document.getElementById("theme")), null != f.attr("defaultPageSelWidth") && (e = Number(f.attr("defaultPageSelWidth")))), 
    g = 3, $(this).attr("centerPageNum") && (g = Number($(this).attr("centerPageNum"))), 
    h = 1, $(this).attr("edgePageNum") && (h = Number($(this).attr("edgePageNum"))), 
    i = 0, $(this).attr("page") ? i = Number($(this).attr("page")) : $(this).attr("page", i), 
    j = !1, ("true" == $(this).attr("showSelect") || 1 == $(this).attr("showSelect")) && (j = !0), 
    k = {
        list: [ {
            key: 10,
            value: 10
        }, {
            key: 20,
            value: 20
        }, {
            key: 50,
            value: 50
        } ]
    }, $(this).attr("selectData")) try {
        k = JSON.parse($(this).attr("selectData"));
    } catch (l) {
        k = {
            list: [ {
                key: 10,
                value: 10
            }, {
                key: 20,
                value: 20
            }, {
                key: 50,
                value: 50
            } ]
        }, alert(uncompile(quiLanguage.pageArrow.errorMessage2));
    }
    m = !0, ("false" == $(this).attr("showInput") || 0 == $(this).attr("showInput")) && (m = !1), 
    n = "center", $(this).attr("inputPosition") && (n = $(this).attr("inputPosition")), 
    o = !1, ("true" == $(this).attr("showNumber") || 1 == $(this).attr("showNumber")) && (o = !0), 
    p = "top", "bottom" == $(this).attr("selectDirection") && (p = "bottom"), $(this).paginationArrow(a, {
        items_per_page: b,
        num_display_entries: g,
        num_edge_entries: h,
        current_page: i,
        showSelect: j,
        selectData: k,
        showInput: m,
        inputPosition: n,
        showNumber: o,
        selectDirection: p,
        selWidth: c,
        defaultPageSelWidth: e
    });
}, jQuery.fn.paginationArrow = function(a, b) {
    return b = jQuery.extend({
        items_per_page: 10,
        num_display_entries: 5,
        current_page: 0,
        num_edge_entries: 1,
        link_to: "javascript:;",
        prev_text: uncompile(quiLanguage.pageArrow.prePageText),
        next_text: uncompile(quiLanguage.pageArrow.nextPageText),
        ellipse_text: "...",
        prev_show_always: !0,
        next_show_always: !0,
        showSelect: !1,
        selectData: {
            list: [ {
                key: 10,
                value: 10
            }, {
                key: 20,
                value: 20
            }, {
                key: 50,
                value: 50
            } ]
        },
        showInput: !0,
        inputPosition: "center",
        showNumber: !1,
        selectDirection: "top",
        selWidth: 50,
        defaultPageSelWidth: 0,
        callback: function() {
            return !1;
        }
    }, b || {}), this.each(function() {
        function c() {
            return Math.ceil(a / b.items_per_page);
        }
        function d() {
            var a = Math.ceil(b.num_display_entries / 2), d = c(), e = d - b.num_display_entries, f = g > a ? Math.max(Math.min(g - a, e), 0) : 0, h = g >= a ? Math.min(g + a, d) : Math.min(b.num_display_entries, d);
            return [ f, h ];
        }
        function e(a, b, c) {
            g = a, f();
            var d;
            return d = h.trigger("pageChange", g), h.attr("page", g), c && h.trigger("sizeChange", c), 
            d || (b.stopPropagation ? b.stopPropagation() : b.cancelBubble = !0), d;
        }
        function f() {
            var a, i, j, k, l, m, n, o, p, q, r, s, t, u, v;
            if (h.empty(), a = d(), i = c(), j = function(a) {
                return function(b) {
                    return e(a, b);
                };
            }, k = function(a, b) {
                var c;
                a = 0 > a ? 0 : i > a ? a : i - 1, b = jQuery.extend({
                    text: a + 1,
                    classes: ""
                }, b || {}), c = a == g ? jQuery("<span class='current'>" + b.text + "</span>") : jQuery("<a>" + b.text + "</a>").bind("click", j(a)), 
                b.classes && c.addClass(b.classes), h.append(c);
            }, k(0, {
                text: "",
                classes: "pageArrow_first"
            }), k(g - 1, {
                text: "",
                classes: "pageArrow_prev"
            }), 1 == b.showNumber) {
                if (a[0] > 0 && b.num_edge_entries > 0) {
                    for (l = Math.min(b.num_edge_entries, a[0]), m = 0; l > m; m++) k(m);
                    b.num_edge_entries < a[0] && b.ellipse_text && jQuery("<span>" + b.ellipse_text + "</span>").appendTo(h);
                }
                for (m = a[0]; m < a[1]; m++) k(m);
                if (a[1] < i && b.num_edge_entries > 0) for (i - b.num_edge_entries > a[1] && b.ellipse_text && jQuery("<span>" + b.ellipse_text + "</span>").appendTo(h), 
                n = Math.max(i - b.num_edge_entries, a[1]), m = n; i > m; m++) k(m);
            }
            1 == b.showInput && "center" == b.inputPosition ? (o = $('<input type="text" style="width:25px;height:14px;line-height:14px;" inputMode="numberOnly"/>'), 
            p = $('<div style="float:left;padding:5px 0 0 0;"></div><div style="float:left;padding:5px 0 0 2px;font-size:14px;"></div><div style="float:left;padding:5px 0 0 2px;font-size:14px;"></div>'), 
            p.eq(0).append(o), o.render(), o.val(g + 1), p.eq(1).html("/"), p.eq(2).html(i), 
            h.append(p), o.keydown(function(a) {
                13 == a.keyCode && (Number(o.val()) > i ? e(i - 1) : Number(o.val()) < 1 ? e(0) : e(Number(o.val()) - 1));
            }), o.click(function() {
                $(this).select();
            })) : 0 == b.showNumber && (q = $('<div style="float:left;padding:5px 3px 0 0;font-size:14px;"></div>'), 
            q.html(g + 1 + "/" + i), h.append(q)), k(g + 1, {
                text: "",
                classes: "pageArrow_next"
            }), k(i, {
                text: "",
                classes: "pageArrow_last"
            }), 1 == b.showSelect && (r = $("<select></select>"), r.data("data", b.selectData), 
            s = $('<div style="float:left;padding:5px 0 0 5px;">' + uncompile(quiLanguage.pageArrow.pageNumText1) + '</div><div style="float:left;padding:0px 0 0 2px;"></div><div style="float:left;padding:5px 0 0 2px;">' + uncompile(quiLanguage.pageArrow.pageNumText2) + "</div>"), 
            s.eq(1).append(r), t = Number(h.attr("pageSize")), 0 != b.defaultPageSelWidth ? (s.eq(1).width(b.defaultPageSelWidth + 10), 
            r.attr("selWidth", b.defaultPageSelWidth), r.attr("boxWidth", b.defaultPageSelWidth)) : (s.eq(1).width(b.selWidth + 10), 
            r.attr("selWidth", b.selWidth), r.attr("boxWidth", b.selWidth)), r.attr("selectedValue", t), 
            r.attr("openDirection", b.selectDirection), r.selectRender(), r.unbind("change"), 
            r.bind("change", function() {
                t = r.attr("relValue"), h.attr("pageSize", t), b.items_per_page = Number(t), i = c(), 
                g > i - 1 ? e(i - 1, null, t) : h.trigger("sizeChange", t), f();
            }), h.append(s)), 1 == b.showInput && "right" == b.inputPosition && (u = $('<input type="text" style="width:25px;" inputMode="numberOnly"/>'), 
            v = $('<div style="float:left;padding:5px 0 0 4px;"></div><div style="float:left;padding:0px 0 0 4px;"></div><div style="float:left;padding:5px 0 0 2px;"></div>'), 
            v.eq(0).html(uncompile(quiLanguage.pageArrow.pageJumpText1)), v.eq(1).append(u), 
            u.render(), v.eq(2).html(uncompile(quiLanguage.pageArrow.pageJumpText2)), h.append(v), 
            u.keydown(function(a) {
                13 == a.keyCode && (Number(u.val()) > i ? e(i - 1) : e(Number(u.val()) - 1));
            })), h.append($('<div style="clear:both;"></div>'));
        }
        var h, g = b.current_page;
        a = !a || 0 > a ? 1 : a, b.items_per_page = !b.items_per_page || b.items_per_page < 0 ? 1 : b.items_per_page, 
        h = jQuery(this), h.data("selectCurrent", b.selectCurrent), this.selectPage = function(a) {
            e(a);
        }, this.prevPage = function() {
            return g > 0 ? (e(g - 1), !0) : !1;
        }, this.nextPage = function() {
            return g < c() - 1 ? (e(g + 1), !0) : !1;
        }, f();
    });
};